<template>
  <div class="data-collection-page page-wrap">
    <!--        头部-->
    <container></container>

    <!-- 右侧内容区域 -->
    <div class="container-panel ">
      <!-- 左侧树形菜单 -->
      <div class="tree-container">
        <!-- <el-tree :data="data" :props="defaultProps" accordion @node-click="handleNodeClick"></el-tree> -->
        <tree @showTp="showTp"></tree>
      </div>
      <!-- 右侧内容区域 -->
      <div class="content-right-content border-box">
        <!-- 面板内容 -->
        <router-view></router-view>
      </div>
    </div>
    <!--    底部-->
    <bottom-tip></bottom-tip>
  </div>

</template>
<script>
import Container from "@/components/Container"
import BottomTip from "@/components/BottomTip"
import tree from "@/components/auditOperationTree"
import {parseTime} from "@/utils/index.js"
import auditEvidence from './auditEvidence'
import auditEvidenceAdd from './auditEvidenceAdd'
import auditevidencedocket from './auditevidencedocket'
import auditdraft from './auditdraft'
import auditreport from './auditreport'
import auditcommon from './auditcommon'
export default {
  components: {
    tree,
    auditEvidence,
    auditevidencedocket,
    auditdraft,
    auditreport,
    auditcommon,
    auditEvidenceAdd,
    BottomTip,
    Container
  },
  data() {
    return {
      title: '',
      name: '',
      type: '', //节点类型：证据/取证单/底稿/报告
      nowTime: "" // 当前时间
    };
  },
  computed: {
    // selected() {
    //   return this.$store.getters.selected;
    // }
  },
  mounted() {
    this.nowTime = parseTime(new Date());
  },
  methods: {
    showTp(data) {
      //console.log(data)
      this.type = data.id
      this.name = data.label
      if (this.type === 21) {
        this.title = '证据列表'
      } else if (this.type === 22) {
        this.title = '取证单列表'
      } else if (this.type === 23) {
        this.title = '底稿列表'
      } else if (this.type === 31) {
        this.title = '报告列表'
      } else if (this.type === 11) {
        this.title = '底稿列表'
        this.name = '审计工作底稿'
      }
      //console.log(this.type)
      //console.log(this.name)
    }
  }
}
</script>

<style lang="less" scoped>
</style>
